import { BaseService, Service, Permission } from '@/cool';

@Service('crm/pid')
export default class extends BaseService {
	@Permission('labelList')
	async labelList(params) {
		return this.request({
			url: '/labelList',
			params: {
				...params
			}
		});
	}

	@Permission('addLabel')
	async addLabel(params) {
		return this.request({
			url: '/addLabel',
			method: 'POST',
			data: {
				...params
			}
		});
	}

	@Permission('staffList')
	staffList(params) {
		return this.request({
			url: '/staffList',
			params: {
				...params
			}
		});
	}
	@Permission('bindStaff')
	async bindStaff(params) {
		return this.request({
			url: '/bindStaff',
			method: 'POST',
			data: {
				...params
			}
		});
	}
	@Permission('bindPid')
	async bindPid(params) {
		return this.request({
			url: '/bindPid',
			method: 'POST',
			data: {
				...params
			}
		});
	}
	@Permission('setLabels')
	async setLabels(params) {
		return this.request({
			url: '/setLabels',
			method: 'POST',
			data: {
				...params
			}
		});
	}
}
